﻿@inject IStringLocalizer<DialogErrorLogger> Localizer

<Button OnClick="@OnErrorDialog" Text="@Localizer["ErrorLoggerButton"]" Icon="fa-solid fa-bug" />

@code {
    [Inject]
    [NotNull]
    private DialogService? DialogService { get; set; }

    private Task OnErrorDialog() => DialogService.Show(new DialogOption()
    {
        Title = "Click the button to report the error test",
        Component = BootstrapDynamicComponent.CreateComponent<ErrorCounter>()
    });
}
